﻿@page
@model AgentsModel
@{
    ViewData["Title"] = "Client Downloads";
}

<div class="row mb-3">
    <h4>Instant Support Clients</h4>
    <div class="text-info col-sm-12 pl-0 mb-2">
        Instant desktop sharing.  No account required.
    </div>
     <div class="col-sm-6 mb-3">
        <h6>Windows (64-Bit)</h6>
        <p>
            <strong>Download:</strong>
            <br />
            <a href="~/Downloads/Win-x64/Remotely_Desktop.exe">Windows EXE</a>
        </p>
    </div>
    <div class="col-sm-6">
        <h6>Windows (32-Bit)</h6>
        <p>
            <strong>Download:</strong>
            <br />
            <a href="~/Downloads/Win-x86/Remotely_Desktop.exe">Windows EXE</a>
        </p>
    </div>
    <div class="col-sm-6 mb-3">
        <h6>Linux 64-Bit</h6>
        <p>
            <strong>Download:</strong>
            <br />
            <a href="~/Downloads/Remotely_Desktop">Ubuntu Executable</a>
        </p>
    </div>
</div>

<div class="row">
    <h4>Resident Agents</h4>
    <div class="text-info col-sm-12 pl-0 mb-2">
        Installable background agents that provide unattended access and remote scripting.
    </div>
    @if (User.Identity.IsAuthenticated)
    {
    <div class="col-sm-6 mb-3">
        <h6>Windows 10 / 8.1 / 7 (64-Bit and 32-Bit)</h6>
        <p>
            <small>Note: GPU-accelerated screen capture and PowerShell Core is unavailable on Windows 7.</small>
        </p>
        <p>
            <strong>Download:</strong>
            <br />
            <a href="/API/ClientDownloads/Windows">Windows Installer (x64/x86)</a>
            <br />
            <a href="~/Downloads/Remotely-Win10-x64.zip">Windows x64 Files Only</a>
            <br />
            <a href="~/Downloads/Remotely-Win10-x86.zip">Windows x86 Files Only</a>
        </p>

        <p>
            <strong>Quiet Install:</strong>
            <br />
            <span class="label label-default code">
               Remotely_Installer.exe
                -install 
                -quiet
                -organizationid "0b3d706b-9c5d-41e6-8ae9-5720d16324e6" 
                -serverurl "https://remotely.mytechshop.com"
            </span>
        </p>
        <p>
            <strong>Quiet Uninstall:</strong>
            <br />
            <span class="label label-default code">Remotely_Installer.exe -uninstall -quiet</span>
        </p>
        <p>
            <strong>Local Install:</strong>
            <span data-toggle="modal" data-target="#localInstallInfo" class="fas fa-question-circle pointer"></span>
            <br />
            <span class="label label-default code">
                Remotely_Installer.exe
                -install 
                -quiet
                -organizationid "0b3d706b-9c5d-41e6-8ae9-5720d16324e6" 
                -serverurl "https://remotely.mytechshop.com"
                -path "[path]\Remotely-Win10-x64.zip"
            </span>
        </p>
        <p>
            <strong>Override Options:</strong>
            <br />
            <span class="label label-default code">
                Remotely_Installer.exe -install -quiet -supportshortcut 
                -organizationid "0b3d706b-9c5d-41e6-8ae9-5720d16324e6" 
                -serverurl "https://remotely.mytechshop.com"
                -devicegroup "Customer Group 1"
                -devicealias "Front Desk"
                -deviceuuid "eebb4d87-5459-4976-989e-a7876dffc69c"
            </span>
        </p>
    </div>

    <div class="col-sm-6 mb-3">
        <h6>Linux 64-Bit</h6>
        <p>
            <strong>Download:</strong>
            <br />
            <a href="/API/ClientDownloads/Ubuntu-x64">Ubuntu x64 Bash Installer</a>
            <br />
            <a href="/API/ClientDownloads/Manjaro-x64">Manjaro x64 Bash Installer</a>
            <br />
            <a href="~/Downloads/Remotely-Linux.zip">Linux x64 Files Only</a>
        </p>
        <p>
            <strong>Install:</strong>
            <br />
            <span class="label label-default code">sudo [path]/Install-Linux-x64.sh</span>
        </p>
        <p>
            <strong>Local Install:</strong>
            <span data-toggle="modal" data-target="#localInstallInfo" class="fas fa-question-circle pointer"></span>
            <br />
            <span class="label label-default code">sudo [path]/Install-Linux-x64.sh --path [path]/Remotely-Linux.zip</span>
        </p>
        <p>
            <strong>Uninstall:</strong>
            <br />
            <span class="label label-default code">sudo [path]/Install-Linux-x64.sh --uninstall</span>
        </p>
    </div>
    }
    else
    {
        <div class="col-sm-6 mb-3">
            <h6>Resident clients are available after logging in.</h6>
        </div>

    }
</div>
<div id="localInstallInfo" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">Local Installs</h4>
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            </div>
            <div class="modal-body">
                <p>
                    By default, the installer will download the client files from the server before installing them.
                    This is fine for one or two devices, but it wouldn't be ideal to have a large number of computers
                    downloading over the WAN simultaneously.
                    <br /><br />
                    To reduce bandwidth usage, you can download separately the ZIP file containing the client files and put
                    them on a network share. Then you can use the -path argument to have the script copy the files from
                    that location.
                </p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>